import Vue from "vue";

import modal from "./modal";
import messageBox from "./message-box";
import toast from "./toast";
import test from "./test";

var components = [modal, messageBox, toast, test];

export default function install(Vue, opts = {}) {
  components.forEach(component => {
    if (typeof component === "function") {
      Vue.prototype[component.$name] = component;
      return;
    }
    Vue.component(component.name, component);
  });
}
